#include <stdio.h>
#include <stdlib.h>

int search(int *list, int n, int x)
{
	int flag = 1;
	int i = 0;
	for (i = 0; i < n; i++)
	{
		if (list[i] == x)
			return i;
	}
	return -1;
}

int main()
{
	int n = 0, x = 0, i = 0;
	int* list = (int*)malloc(static_cast<size_t>(n) * 4);
	
	printf("input n: "); scanf("%d", &n);
	printf("input %d number:\n", n);
	for (i = 0; i < n; i++)
		scanf("%d", &list[i]);

	printf("input x: ");  scanf("%d", &x);

	int tmp = search(list, n, x);
	if (tmp != -1)
		printf("index = %d", tmp);
	else
		printf(" Not found");

	return 0;
}